//
//  DKCalendarUtility.h
//  Whistle
//
//  Created by ZhangAo on 2018/1/24.
//  Copyright © 2018年 BookSir. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DKCalendarUtility : NSObject

// 日历
+ (NSCalendar *)calendar;

// 默认最小可选择时间
+ (NSDate *)minimumDate;

// 默认最大可选择时间
+ (NSDate *)maximumDate;

/*
 *  获取区间段内的天数
 */
+ (NSInteger)calculationRowCountWithBegin:(NSDate *)beginDate
                                  endDate:(NSDate *)endDate;

+ (NSDate *)dateByAddingDay:(NSInteger)day
                      month:(NSInteger)month
                       year:(NSInteger)year
                   fromDate:(NSDate *)fromDate;

/*
 *  获取某个月的第一天
 */
+ (NSDate *)monthFirstDayDate:(NSDate *)date;

+ (NSDate *)monthLastDay:(NSDate *)date;

/*
 *  获取某个月天数
 */
+ (NSInteger)monthHaveDayCount:(NSDate *)date;

// date 是周几
+ (NSInteger)weekDayForDate:(NSDate *)date;

// 对比 date 是否等于 compareDate
+ (BOOL)compareDateEqualWithDate:(NSDate *)date
                     compareDate:(NSDate *)compareDate
              isOnlyCompareMonth:(BOOL)isOnlyCompareMonth;

+ (NSInteger)dayCountWithBeginDate:(NSDate *)beginDate endDate:(NSDate *)endDate;

+ (NSDateComponents *)fetchDateComponentsWith:(NSDate *)date;

+ (NSDate *)mondayWithDate:(NSDate *)date;

+ (NSDate *)sundayWithDate:(NSDate *)date;

+ (NSString *)chineseDayString:(NSDate *)date;

+ (NSString *)getHolidays:(NSDate *)date;

@end
